<%--
  Created by IntelliJ IDEA.
  User: Alex
  Date: 4/26/11
  Time: 11:08 AM
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" %>
<div class="summary">
    <h3>${movie.title}</h3>
    <img class="moviePic" src=${img} />
    <table>
        <tr>
            <td><strong>Avg Rating:</strong></td> <td>${avgRating}</td>
        </tr>
        <tr>
            <td><strong>Your Rating:</strong></td> <td><g:render template="/templates/ratingwidget" model="${[rating:rating.rating, id:movie.id]}"/></td>
        </tr>
        <tr>
            <td><strong>Number of Ratings:</strong></td> <td>${movie.retrieveNumberRatings()}</td>
        </tr>
        <tr>
            <td><strong>Director:</strong></td> <td><a href="/FilmRing/director/show/${movie.director.id}">${movie.director.name}</a></td>
        </tr>
        <tr>
            <td><strong>Actors:</strong></td>
            <td>
                <g:each in="${movie.roles}">
                    <a href="/FilmRing/actor/show/${it.actor.id}">${it.actor.name}</a>
                </g:each>
            </td>
        </tr>
    </table>
</div>